﻿namespace Snipps.ViewModels
{
    using SimpleInjector;

    public class ViewModelLocator
    {
        private static Container _container;

        public ViewModelLocator()
        {
            var bs = new Bootstrapper();
            bs.Run();

            _container = bs.Container;
        }

        public static MainViewModel MainViewModelStatic
        {
            get
            {
                return _container.GetInstance<MainViewModel>();
            }
        }

        public MainViewModel MainViewModel
        {
            get
            {
                return MainViewModelStatic;
            }
        }

        public static void Cleanup()
        {
            MainViewModelStatic.Cleanup();
        }
    }
}